package com.anywhere.freightman.system.model;

import com.anywhere.freightman.common.BaseModel;
import com.anywhere.freightman.common.enumeration.CommonStatus;
import com.anywhere.freightman.common.enumeration.TokenType;

import javax.persistence.*;
import java.util.Date;

@Table(name = "access_token")
@Entity
public class AccessToken extends BaseModel {
    private Long userId;
    private String token;
    @Enumerated(EnumType.STRING)
    @Column(name = "status", length = 30)
    private CommonStatus status;
    private Date createTime;
    @Enumerated(EnumType.STRING)
    @Column(name = "type", length = 30)
    private TokenType type;

    public TokenType getType() {
        return type;
    }

    public void setType(TokenType type) {
        this.type = type;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public CommonStatus getStatus() {
        return status;
    }

    public void setStatus(CommonStatus status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
